import i18n from '@src/locales';
import FormProductSetting from './FormProductSetting.vue';
import FormProductView from './FormProductView.vue';
import FormProductPreview from './FormProductPreview.vue';
import FormProduct from './FormProduct.vue';

let FormCustomerProductField = {
  formType: 'product',
  name: i18n.t('common.form.type.product'),
  isSystem: 0,
  previewIcon: 'icon-chanpin',
  forceDelete: true,
  isSystemControl: true,
  subFormFieldList: () => {
    return [{
    "id": "5823",
    "fieldName": "serviceStartTime",
    "displayName": i18n.t('common.fields.serviceStartTime.displayName'),
    "formType": "date",
    "setting": {
      "dateType": "yyyy-MM-dd"
    },
    "orderId": 4,
    "isHidden": 0,
    "parentFieldId": "field_XRFGroDOqVCRNmEMV4lUwsxNXGQ4V6zY",
    "placeHolder": "",
    "isNull": 1,
    "isSearch": 0,
    "isSystem": 1,
    "isVisible": true,
    "tableName": "contract",
    "defaultValue": null
  }, {
    "id": "5823",
    "fieldName": "serviceEndTime",
    "displayName": i18n.t('common.fields.serviceEndTime.displayName'),
    "formType": "date",
    "setting": {
      "dateType": "yyyy-MM-dd"
    },
    "orderId": 4,
    "isHidden": 0,
    "parentFieldId": "field_XRFGroDOqVCRNmEMV4lUwsxNXGQ4V6zY",
    "placeHolder": "",
    "isNull": 1,
    "isSearch": 0,
    "isSystem": 1,
    "isVisible": true,
    "tableName": "contract",
    "defaultValue": null
  }, {
    "id": "5823",
    "fieldName": "serviceMoney",
    "displayName": i18n.t('common.fields.serviceMoney.displayName'),
    "formType": "number",
    "setting": {
      "decimalConfig": {
        "digit": "2",
        "isLimit": 1
      },
      "limitConig": {
        "isLimit": 1,
        "max": "999999",
        "min": "-99999",
        "type": 1
      }
    },
    "orderId": 4,
    "isHidden": 0,
    "parentFieldId": "field_XRFGroDOqVCRNmEMV4lUwsxNXGQ4V6zY",
    "placeHolder": "",
    "isNull": 0,
    "isSearch": 0,
    "isSystem": 1,
    "isVisible": 1,
    "tableName": "contract",
    "defaultValue": null
  }, {
    "id": "5823",
    "fieldName": "",
    "displayName": i18n.t('common.fields.serviceContent.displayName'),
    "formType": "textarea",
    "setting": {},
    "orderId": 4,
    "isHidden": 0,
    "parentFieldId": "field_XRFGroDOqVCRNmEMV4lUwsxNXGQ4V6zY",
    "placeHolder": "",
    "isNull": 1,
    "isSearch": 0,
    "isSystem": 0,
    "isVisible": true,
    "tableName": "contract",
    "defaultValue": null
  }]
  },
  isSubForm: true,
  component: {
    setting: FormProductSetting,
    preview: FormProductPreview,
    view: FormProductView,
    build: FormProduct,
    extend: {}
  }
};

export default FormCustomerProductField;
